package com.crazyhat.crazyhat.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.crazyhat.crazyhat.pojo.Manage;
import com.crazyhat.crazyhat.pojo.Result;
import com.crazyhat.crazyhat.service.IManageService;

@RestController
@RequestMapping("/manage")
public class ManageController {

    @Autowired
    private IManageService manageService;

    /*
    * 查看自己管理的社团
    * */
    @GetMapping("/personalManage")
    public Result<Page<Manage>> getPersonalManage(@RequestParam int pageNum,@RequestParam int pageSize) {
        Page<Manage> managePage = manageService.getPersonalManagePlus(pageNum, pageSize);
        return Result.success(managePage);
    }
}
